<?php use_stylesheets_for_form($form_popup) ?>
<?php use_javascripts_for_form($form_popup) ?>

<div class="modal" id="popup" style="display: none;">
    <div class="modal-header">
        <a class="close" data-dismiss="modal">x</a>
        <h3><?php echo __('Send Email', null, 'tmcTwitterBootstrapPlugin') ?></h3>
    </div>
    <div class="modal-body">
        <div class="admin-filter">
            <?php if ($form_popup->hasGlobalErrors()): ?>
                <?php echo $form_popup->renderGlobalErrors() ?>
            <?php endif; ?>

            <form class="form-horizontal form-inline" action="<?php echo url_for('jobeet_job_ok_collection', array('action' => 'popup')) ?>" method="post">
                <?php foreach ($configuration->getFormFilterFields($form_popup) as $name => $field): ?>
                    <?php if ((isset($form_popup[$name]) && $form_popup[$name]->isHidden()) || (!isset($form_popup[$name]) && $field->isReal())) continue ?>
                    <?php include_partial('ok/filters_field', array(
                        'name'       => $name,
                        'attributes' => $field->getConfig('attributes', array()),
                        'label'      => $field->getConfig('label'),
                        'help'       => $field->getConfig('help'),
                        'form'       => $form_popup,
                        'field'      => $field,
                        'class'      => 'sf_admin_form_row sf_admin_'.strtolower($field->getType()).' sf_admin_filter_field_'.$name,
                    )) ?>
                <?php endforeach; ?>
                <div class="modal-footer">
                    <input class="btn" type="submit" value="<?php echo __('Send', array(), 'tmcTwitterBootstrapPlugin') ?>" />
                </div>
            </form>
        </div>
    </div>
</div>
